import request from "@/utils/request";

// 公告列表 /notice/:page
export const getNoticeList = ({page}) => {
  return request({
    url: `/notice/${page}`,
    method: "get",
  });
};

// 新增 /notice
export const addNotice = (data) => {
  return request({
    url: `/notice`,
    method: "post",
    data
  });
};
// 修改
export const editNotice = (id,data) => {
  return request({
    url: `/notice/${id}`,
    method: "post",
    data
  });
};
// 删除
export const delNotice = (id) => {
  return request({
    url: `/notice/${id}/delete`,
    method: "post",
  });
};